package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum FlinkNodeType {

    source(1 , "source" ),
    select(2 , "select" ),
    filter(3 , "filter" ),
    unique(4 , "去重" ),
    group_by(5 , "group by" ),
    kafka(6 , "kafka" ),
    mysql(7 , "mysql" ),
    hive(8 , "hive" ),
    kudu(9 , "kudu" );
    private  Integer id;
    private  String  name;
    FlinkNodeType(int id , String  name){
        this.id = id;
        this.name = name;
    }

    public static FlinkNodeType ObjOf(Integer status) {
        for (FlinkNodeType s : FlinkNodeType.values()) {
            if (s.getId().equals(status)) {
                return s;
            }
        }
        return null;
    }
}
